<template>
	<view class="content">
		<image class="logo" src="../../static/logo.png" mode="aspectFill"></image>
	</view>
</template>

<script setup>
	import {
		getUserOpenId
	} from "../../utils/getOpenId";
	import {
		md5
	} from 'js-md5';

	import {
		getUserScoreFromCloud,
		saveUserCloudScoreToLocal
	} from '../../store/scoreManager.js'
	import {
		onMounted
	} from "vue";
	import {
		onLoad,
		onShow
	} from "@dcloudio/uni-app"
	onMounted(() => {
			let agree = uni.getStorageSync('agree')
			plus.navigator.closeSplashscreen()
			if(agree){
				setTimeout(() => {
					loginUser()
				}, 500)
			}else{
				// ios单独进行隐私政策验证
				uni.reLaunch({
					url: "/pages/index/privacy",
					success() {
						plus.navigator.closeSplashscreen()
					}
				})
			}
	})

	onShow(() => {
		
	})

	function loginUser() {
		uni.setStorageSync("userType", 1);
		const score = uni.getStorageSync("myScore")
		if(score == 0){
			uni.setStorageSync("myScore", 1000);
		}
		uni.reLaunch({
			url: '/pages/index/shouye' + '?usertype=2'
		})
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.text-area {
		display: flex;
		justify-content: center;
		color: gold;
		font-size: 100rpx;
		font-weight: bold;
		width: 100%;
		text-align: center;
	}

	.logo {
		height: 250rpx;
		width: 250rpx;
		margin-top: 400rpx;
		border-radius: 50%;
	}
</style>